// ActorApi.js 封装演员模块相关接口
import myaxios from '../MyAxios'
import BASEURL from '../BaseUrl'
const BMDURL = BASEURL.BMDURL

const hospitalApi = {

    /** 查询所有医院 返回Promise对象 */
    queryAll(params){
        let url = BMDURL + "/hospital-all"
        return myaxios.get(url,params)
    },

    // 通过名字查询医院信息
    queryByName(params){
        let url = BMDURL + '/hospitalByName'
        return myaxios.post(url,params)
    },

    // 通过省份查询医院
    queryByPNameLike(params){
        let url = BMDURL + "/hospitalBy-province"
        return myaxios.post(url, params)
    },
    // 通过城市查询医院
    queryByCNameLike(params){
        let url = BMDURL + "/hospitalBy-city"
        return myaxios.post(url, params)
    },
    // 通过醫院id查询医院信息
    queryById(params){
        let url = BMDURL + '/hospitalById'
        return myaxios.get(url,params)
    },
    // 删除医院
    delete(params){
        let url = BMDURL + '/hospital/delete'
        return myaxios.post(url,params)
    },
    // 修改医院
    update(params){
        let url = BMDURL + '/hospital/update'
        return myaxios.post(url,params)
    },
    // 新增医院
    add(params){
        let url = BMDURL + '/hospital/add'
        return myaxios.post(url,params)
    }
}
export default hospitalApi;